package com.karenzou.elstudio.jewels.activity;

import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.engine.camera.Camera;
import org.anddev.andengine.engine.options.EngineOptions;
import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation;
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.scene.background.ColorBackground;
import org.anddev.andengine.ui.activity.BaseGameActivity;

import android.view.KeyEvent;

import com.karenzou.elstudio.jewels.IConstant;
import com.karenzou.elstudio.jewels.util.ActivityUtil;

public class JewelsActivity extends BaseGameActivity
        implements IConstant{

	

	@Override
	public Engine onLoadEngine() {
		return new Engine(new EngineOptions(
				true, 
				ScreenOrientation.PORTRAIT, 
				new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), 
				new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT)));
	}

	@Override
	public void onLoadResources() {
	}

	@Override
	public Scene onLoadScene() {
		final Scene scene = new Scene();
		scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
		return scene;
	}
	
	@Override
	public void onLoadComplete() {
	}
	
	
	
	@Override
	public void onBackPressed() {
		super.onBackPressed();
		finishActivity();
	}
	
	private void finishActivity(){
		ActivityUtil.toMenuActivity(this);
		finish();
	}

}
